Class and Behavioural Models
1.
Draw a class diagram to
represent the information in the following paragraph. Where appropriate your
diagram should include association, aggregation, generalisation and
multiplicity. For each identified class you should list sample attributes.
A small diary company wants to automate orders and payment on their milk rounds. Each milkman set off on his round with the products that he is going to deliver and his list of customer requirements. As he comes to each house on his list, he checks to see what products are required. Customers have standing orders. If a customer wants to alter the order temporarily, this is classed as an exception (e.g. “1 extra pint today”, “6 yoghurts on Thursday”). From time to time the diary offers certain products at a special rate; orders for these products are known as promotion orders. All orders, standing, exception and promotion consist of individual order lines for each product ordered. On Fridays the milkman comes round to collect money. Most customers pay cash weekly, although some pay monthly by cheque.
2. A library stores various items that can be borrowed,
including books and journals. Books can be borrowed by both staff and students,
but only staff members can borrow journals. When a user borrows a book, their
loan details are checked to ensure that they have no overdue books on loan, and
have not already borrowed the maximum permitted number of books. Users can
check their own loan details at any time. Librarians are permitted to check the
loan details of any user. Library users can reserve books that are currently
out of loan. If three reservations have already been made for a given book, and
a further reservation is made, a new copy will be ordered by the librarian.
·
Draw a use case diagram using
Together Control Center for the library system.
·
Write an extended
essential description for the Borrow Book use case.
·
Draw an activity diagram
using Together Control Center to describe how the Borrow Book use case
is carried out.